/*****************************************************************************
*        描述 :
*             文件描述
*        CLR版本:            3.5
*        创建者 :            蒋 光
*        个人域名:           jiangguang.net.cn
*        命名空间名称:       ECP.Utilities
*        文件名:             BaseRandom.cs
*        创建系统时间:       2012/11/2 19:07:07
*        创建年份:           2012
*
/*****************************************************************************/

namespace ECP.Utilities
{
    using System;

    public class BaseRandom
    {
        public static int Maximal = 0xf423f;
        public static int Minimum = 0x186a0;
        private static System.Random Random = new System.Random(DateTime.Now.Second);
        public static int RandomLength = 6;
        private static string RandomString = "0123456789ABCDEFGHIJKMLNOPQRSTUVWXYZ";

        public static int GetRandom()
        {
            return Random.Next(Minimum, Maximal);
        }

        public static int GetRandom(int minimum, int maximal)
        {
            return Random.Next(minimum, maximal);
        }

        public static string GetRandomString()
        {
            string str = string.Empty;
            for (int i = 0; i < RandomLength; i++)
            {
                int num2 = Random.Next(0, RandomString.Length - 1);
                str = str + RandomString[num2];
            }
            return str;
        }
    }
}